package 继承project;

/**
 * 作者:TC
 * 时间:继承的测试类 19:21
 * 描述:没有bug
 */
public class Test {
    public static void main(String[] args) {
        Teacher t=new Teacher();
        t.setAge(18);
        t.setName("tc");
        System.out.println("name:"+t.getName()+" age:"+t.getAge());
        t.teach();
        /*使用带参构造方法*/
        Teacher t1=new Teacher("tccc",18);
        System.out.println("name："+t1.getName()+" age："+t1.getAge());
    }
}
